<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>02 switch case</title>
</head>

<body>
    <div>

    </div>

    <script>
        // var day = 1;
        var day = prompt('请输入') - 0;
        switch (day) {
            case 1:
                {
                    console.log('周一');
                    break;
                }
            case 2:
                {
                    console.log('周二');
                    break;
                }
            case 3:
                {
                    console.log('周三');
                    break;
                }
            case 4:
                {
                    console.log('周四');
                    break;
                }
            case 5:
                {
                    console.log('周五');
                    break;
                }
            case 6:
                {
                    console.log('周六');
                    break;
                }
            default:
                {
                    console.log('今天休息');
                }
        }

        for (var i = 0; i <= 10; i++) {

        }
        console.log('i:', i)
    </script>
</body>

</html>